package com.googlecode.jawb.clues;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * <p>Specifies that field should be loaded as an array. There are three
 * possibilities how to define requested array length:</p>
 * <ul>
 *   <li>
 *     <pre>staticLength = N</pre>
 *     Array have (or will have) length N, where N is an integer constant value.
 *   </li>
 *   <li>
 *     <pre>dynamicLength = "fieldName"</pre>
 *     Array have (or will have) length equal to integer value in specified field.
 *   </li>
 *   <li>
 *     <pre>staticLength = 0</pre>
 *     When loading, all the following elements will be loaded to this array.
 *   </li>
 * </ul>
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface SetArray {
	public int      staticLength()  default 0;
	public String   dynamicLength() default "";
}
